const { defineConfig } = require('@vue/cli-service')  
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')
require('events').EventEmitter.defaultMaxListeners = 50 // 解除监听事件限制




module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    plugins: [
     AutoImport({
      resolvers: [ElementPlusResolver()]
      }),
     Components({
      resolvers: [ElementPlusResolver()]
      })
     ]
    },
    // devServer: {
    //   host:'127.0.0.1',
    //   port:8080,
    //   open:true,
    //   proxy: {
    //     '/menu': {
    //       target: 'http://localhost:5000/',
    //       changeOrigin: true,
    //       ws:true,
    //       secure:true,
    //       pathRewrite: {
    //         '^/menu': ''
    //       }
    //     }
    //   }
    // }
  }
  )
